import 'mint-ui/lib/style.css'
import '@/styles/index.scss' // global css

import Vue from 'vue'
import MintUI from 'mint-ui'
import photoSwipe from 'kuan-vue-photoswipe'
import * as myFilters from '@/utils/filters'

import App from './App'

import store from './store'
import router from './router'

import clipboard from './utils/vue/directive/clipboard'

import MyComponent from '@/common' // 全局组件
import request from '@/utils/request'
import api from '@/api'

Vue.prototype.$http = request
Vue.prototype.$api = api

Object.keys(myFilters).forEach(key => {
  Vue.filter(key, myFilters[key])
})

Vue.use(clipboard)

// 注册全局组件
Vue.use(MyComponent)
Vue.use(MintUI)
Vue.use(photoSwipe)

Vue.config.productionTip = false

new Vue({
  el: '#app',
  router,
  store,
  template: '<App/>',
  components: { App }
})
